/*
 * @Descripttion: 路由配置,如果页面需缓存,
 * 设置meta: { keepAlive: true }
 * @Author: whl
 * @Date: 2022-06-29 09:45:40
 * @LastEditors: whl
 * @LastEditTime: 2022-07-01 11:23:21
 */
import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/views/index'
import Province from '@/views/province'

Vue.use(Router)

const router = new Router({
  mode: 'history',
  linkActiveClass: 'active',
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'index',
      component: Index,
      meta: {
        title: '首页',
        keepAlive: false
      }
    },
    {
      path: '/province',
      name: 'province',
      component: Province,
      meta: {
        title: '详情页',
        keepAlive: false
      }
    }
  ]
})

export default router
